Optimal. Leaf size=117 \[ -2 f p x+\frac {2 d g p x}{3 e}-\frac {2}{9} g p x^3+\frac {2 \sqrt {d} f p \tan ^{-1}\left (\frac {\sqrt {e} x}{\sqrt {d}}\right )}{\sqrt {e}}-\frac {2 d^{3/2} g p \tan ^{-1}\left (\frac {\sqrt {e} x}{\sqrt {d}}\right )}{3 e^{3/2}}+f x \log \left (c \left (d+e x^2\right )^p\right )+\frac {1}{3} g x^3 \log \left (c \left (d+e x^2\right )^p\right ) \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.06, antiderivative size = 117, normalized size of antiderivative = 1.00, number of steps
used = 9, number of rules used = 6, integrand size = 20, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.300, Rules used = {2521, 2498,
327, 211, 2505, 308} \begin {gather*} -\frac {2 d^{3/2} g p \text {ArcTan}\left (\frac {\sqrt {e} x}{\sqrt {d}}\right )}{3 e^{3/2}}+\frac {2 \sqrt {d} f p \text {ArcTan}\left (\frac {\sqrt {e} x}{\sqrt {d}}\right )}{\sqrt {e}}+f x \log \left (c \left (d+e x^2\right )^p\right )+\frac {1}{3} g x^3 \log \left (c \left (d+e x^2\right )^p\right )+\frac {2 d g p x}{3 e}-2 f p x-\frac {2}{9} g p x^3 \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 211
Rule 308
Rule 327
Rule 2498
Rule 2505
Rule 2521
Rubi steps
\begin {align*} \int \left (f+g x^2\right ) \log \left (c \left (d+e x^2\right )^p\right ) \, dx &=\int \left (f \log \left (c \left (d+e x^2\right )^p\right )+g x^2 \log \left (c \left (d+e x^2\right )^p\right )\right ) \, dx\\ &=f \int \log \left (c \left (d+e x^2\right )^p\right ) \, dx+g \int x^2 \log \left (c \left (d+e x^2\right )^p\right ) \, dx\\ &=f x \log \left (c \left (d+e x^2\right )^p\right )+\frac {1}{3} g x^3 \log \left (c \left (d+e x^2\right )^p\right )-(2 e f p) \int \frac {x^2}{d+e x^2} \, dx-\frac {1}{3} (2 e g p) \int \frac {x^4}{d+e x^2} \, dx\\ &=-2 f p x+f x \log \left (c \left (d+e x^2\right )^p\right )+\frac {1}{3} g x^3 \log \left (c \left (d+e x^2\right )^p\right )+(2 d f p) \int \frac {1}{d+e x^2} \, dx-\frac {1}{3} (2 e g p) \int \left (-\frac {d}{e^2}+\frac {x^2}{e}+\frac {d^2}{e^2 \left (d+e x^2\right )}\right ) \, dx\\ &=-2 f p x+\frac {2 d g p x}{3 e}-\frac {2}{9} g p x^3+\frac {2 \sqrt {d} f p \tan ^{-1}\left (\frac {\sqrt {e} x}{\sqrt {d}}\right )}{\sqrt {e}}+f x \log \left (c \left (d+e x^2\right )^p\right )+\frac {1}{3} g x^3 \log \left (c \left (d+e x^2\right )^p\right )-\frac {\left (2 d^2 g p\right ) \int \frac {1}{d+e x^2} \, dx}{3 e}\\ &=-2 f p x+\frac {2 d g p x}{3 e}-\frac {2}{9} g p x^3+\frac {2 \sqrt {d} f p \tan ^{-1}\left (\frac {\sqrt {e} x}{\sqrt {d}}\right )}{\sqrt {e}}-\frac {2 d^{3/2} g p \tan ^{-1}\left (\frac {\sqrt {e} x}{\sqrt {d}}\right )}{3 e^{3/2}}+f x \log \left (c \left (d+e x^2\right )^p\right )+\frac {1}{3} g x^3 \log \left (c \left (d+e x^2\right )^p\right )\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.03, size = 117, normalized size = 1.00 \begin {gather*} -2 f p x+\frac {2 d g p x}{3 e}-\frac {2}{9} g p x^3+\frac {2 \sqrt {d} f p \tan ^{-1}\left (\frac {\sqrt {e} x}{\sqrt {d}}\right )}{\sqrt {e}}-\frac {2 d^{3/2} g p \tan ^{-1}\left (\frac {\sqrt {e} x}{\sqrt {d}}\right )}{3 e^{3/2}}+f x \log \left (c \left (d+e x^2\right )^p\right )+\frac {1}{3} g x^3 \log \left (c \left (d+e x^2\right )^p\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [C] Result contains higher order function than in optimal. Order 9 vs. order
3.
time = 0.37, size = 416, normalized size = 3.56
method | result | size |
risch | \(\left (\frac {1}{3} g \,x^{3}+f x \right ) \ln \left (\left (e \,x^{2}+d \right )^{p}\right )+\frac {i \pi g \,x^{3} \mathrm {csgn}\left (i \left (e \,x^{2}+d \right )^{p}\right ) \mathrm {csgn}\left (i c \left (e \,x^{2}+d \right )^{p}\right )^{2}}{6}+\frac {i \pi g \,x^{3} \mathrm {csgn}\left (i c \left (e \,x^{2}+d \right )^{p}\right )^{2} \mathrm {csgn}\left (i c \right )}{6}-\frac {i \pi f \,\mathrm {csgn}\left (i \left (e \,x^{2}+d \right )^{p}\right ) \mathrm {csgn}\left (i c \left (e \,x^{2}+d \right )^{p}\right ) \mathrm {csgn}\left (i c \right ) x}{2}-\frac {i \pi g \,x^{3} \mathrm {csgn}\left (i \left (e \,x^{2}+d \right )^{p}\right ) \mathrm {csgn}\left (i c \left (e \,x^{2}+d \right )^{p}\right ) \mathrm {csgn}\left (i c \right )}{6}-\frac {i \pi f \mathrm {csgn}\left (i c \left (e \,x^{2}+d \right )^{p}\right )^{3} x}{2}-\frac {i \pi g \,x^{3} \mathrm {csgn}\left (i c \left (e \,x^{2}+d \right )^{p}\right )^{3}}{6}+\frac {i \pi f \mathrm {csgn}\left (i c \left (e \,x^{2}+d \right )^{p}\right )^{2} \mathrm {csgn}\left (i c \right ) x}{2}+\frac {i \pi f \,\mathrm {csgn}\left (i \left (e \,x^{2}+d \right )^{p}\right ) \mathrm {csgn}\left (i c \left (e \,x^{2}+d \right )^{p}\right )^{2} x}{2}+\frac {\ln \left (c \right ) g \,x^{3}}{3}-\frac {2 g p \,x^{3}}{9}+\frac {\sqrt {-e d}\, p \ln \left (-\sqrt {-e d}\, x -d \right ) d g}{3 e^{2}}-\frac {\sqrt {-e d}\, p \ln \left (-\sqrt {-e d}\, x -d \right ) f}{e}-\frac {\sqrt {-e d}\, p \ln \left (\sqrt {-e d}\, x -d \right ) d g}{3 e^{2}}+\frac {\sqrt {-e d}\, p \ln \left (\sqrt {-e d}\, x -d \right ) f}{e}+\ln \left (c \right ) f x +\frac {2 d g p x}{3 e}-2 f p x\) | \(416\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.55, size = 82, normalized size = 0.70 \begin {gather*} -\frac {2}{9} \, {\left (\frac {3 \, {\left (d^{2} g - 3 \, d f e\right )} \arctan \left (\frac {x e^{\frac {1}{2}}}{\sqrt {d}}\right ) e^{\left (-\frac {5}{2}\right )}}{\sqrt {d}} + {\left (g x^{3} e - 3 \, {\left (d g - 3 \, f e\right )} x\right )} e^{\left (-2\right )}\right )} p e + \frac {1}{3} \, {\left (g x^{3} + 3 \, f x\right )} \log \left ({\left (x^{2} e + d\right )}^{p} c\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.36, size = 217, normalized size = 1.85 \begin {gather*} \left [\frac {1}{9} \, {\left (6 \, d g p x + 3 \, {\left (g p x^{3} + 3 \, f p x\right )} e \log \left (x^{2} e + d\right ) + 3 \, {\left (g x^{3} + 3 \, f x\right )} e \log \left (c\right ) - 3 \, {\left (d g p - 3 \, f p e\right )} \sqrt {-d e^{\left (-1\right )}} \log \left (\frac {x^{2} e + 2 \, \sqrt {-d e^{\left (-1\right )}} x e - d}{x^{2} e + d}\right ) - 2 \, {\left (g p x^{3} + 9 \, f p x\right )} e\right )} e^{\left (-1\right )}, \frac {1}{9} \, {\left (6 \, d g p x - 6 \, {\left (d g p - 3 \, f p e\right )} \sqrt {d} \arctan \left (\frac {x e^{\frac {1}{2}}}{\sqrt {d}}\right ) e^{\left (-\frac {1}{2}\right )} + 3 \, {\left (g p x^{3} + 3 \, f p x\right )} e \log \left (x^{2} e + d\right ) + 3 \, {\left (g x^{3} + 3 \, f x\right )} e \log \left (c\right ) - 2 \, {\left (g p x^{3} + 9 \, f p x\right )} e\right )} e^{\left (-1\right )}\right ] \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 260 vs.
\(2 (121) = 242\).
time = 8.81, size = 260, normalized size = 2.22 \begin {gather*} \begin {cases} \left (f x + \frac {g x^{3}}{3}\right ) \log {\left (0^{p} c \right )} & \text {for}\: d = 0 \wedge e = 0 \\- 2 f p x + f x \log {\left (c \left (e x^{2}\right )^{p} \right )} - \frac {2 g p x^{3}}{9} + \frac {g x^{3} \log {\left (c \left (e x^{2}\right )^{p} \right )}}{3} & \text {for}\: d = 0 \\\left (f x + \frac {g x^{3}}{3}\right ) \log {\left (c d^{p} \right )} & \text {for}\: e = 0 \\- \frac {2 d^{2} g p \log {\left (x - \sqrt {- \frac {d}{e}} \right )}}{3 e^{2} \sqrt {- \frac {d}{e}}} + \frac {d^{2} g \log {\left (c \left (d + e x^{2}\right )^{p} \right )}}{3 e^{2} \sqrt {- \frac {d}{e}}} + \frac {2 d f p \log {\left (x - \sqrt {- \frac {d}{e}} \right )}}{e \sqrt {- \frac {d}{e}}} - \frac {d f \log {\left (c \left (d + e x^{2}\right )^{p} \right )}}{e \sqrt {- \frac {d}{e}}} + \frac {2 d g p x}{3 e} - 2 f p x + f x \log {\left (c \left (d + e x^{2}\right )^{p} \right )} - \frac {2 g p x^{3}}{9} + \frac {g x^{3} \log {\left (c \left (d + e x^{2}\right )^{p} \right )}}{3} & \text {otherwise} \end {cases} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 4.79, size = 109, normalized size = 0.93 \begin {gather*} -\frac {2 \, {\left (d^{2} g p - 3 \, d f p e\right )} \arctan \left (\frac {x e^{\frac {1}{2}}}{\sqrt {d}}\right ) e^{\left (-\frac {3}{2}\right )}}{3 \, \sqrt {d}} + \frac {1}{9} \, {\left (3 \, g p x^{3} e \log \left (x^{2} e + d\right ) - 2 \, g p x^{3} e + 3 \, g x^{3} e \log \left (c\right ) + 9 \, f p x e \log \left (x^{2} e + d\right ) + 6 \, d g p x - 18 \, f p x e + 9 \, f x e \log \left (c\right )\right )} e^{\left (-1\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.32, size = 97, normalized size = 0.83 \begin {gather*} \ln \left (c\,{\left (e\,x^2+d\right )}^p\right )\,\left (\frac {g\,x^3}{3}+f\,x\right )-x\,\left (2\,f\,p-\frac {2\,d\,g\,p}{3\,e}\right )-\frac {2\,g\,p\,x^3}{9}-\frac {2\,\sqrt {d}\,p\,\mathrm {atan}\left (\frac {\sqrt {d}\,\sqrt {e}\,p\,x\,\left (d\,g-3\,e\,f\right )}{d^2\,g\,p-3\,d\,e\,f\,p}\right )\,\left (d\,g-3\,e\,f\right )}{3\,e^{3/2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________